<?php
define('C_ROOT', substr(dirname(__FILE__), 0, -7));
define('C_TPL', C_ROOT.'admin/templates/');//模板目录
include C_ROOT . 'general/config.php';
header('Content-type:text/html;charset=' . $charset);
include C_ROOT . 'include/common.fun.php';
include C_ROOT . 'include/mysql.class.php';
include C_ROOT . 'include/template.class.php';
$tpl = Template::getInstance();
$tpl->setOptions(
        C_TPL . 'default', //指定模板文件存放目录
        C_TPL . 'default/cache/', //指定缓存文件存放目录
        true, //当模板文件有改动时重新生成缓存 [关闭该项会快一些]
        1, //缓存生命周期(分钟)，为 0 表示永久 [设置为 0 会快一些]
        '.html'        //后缀
);
$db = Mysql::getInstance();
$db->setOptions($db_host, $db_user, $db_pwd, $db_database, $coding, $db_prefix);
?>